Search Results: "decklin"

17 January 2006

Decklin Foster: You Can't Eat Culture

You know what I hate? I hate message boards.

Decklin Foster: Worf Impression

Seriously, people, if you want me to click on your survey, explain, in the email, what you are trying to find out and why I should care and in particular why you think self-selected results are worth anything. Don t assume we re not interested in these things! Geeks love research. We do not, however, love boring. Or love pointless.

10 January 2006

Decklin Foster: We Interrupt This Mistake to Bring You

Cripes. Don t ever let me touch the BTS again. At least I sort of fixed PySyck today. Is this still a good idea? I don t know. But I guess someone has to actually use it to get things working.

Decklin Foster: Ogg Quicktime

Hey! Windows/Mac people! Do these work now? I will be extremely happy if the answer is yes.

6 January 2006

Decklin Foster: Musicbrainz Licensing

OK, this one is actually directed at fellow Debianers. I know we can probably weasel out of having a problem distributing code that only talks to a non-commercial-use server somehow, because it really is not any sort of restriction on the code per se, and there are a million precedents (hello, Gaim buddy list next to this window, you used to not have Jabber support), but this still leaves a sour taste in my mouth. At least FreeDB is GPL. I don t think this is worthy of a thread on -legal yet (nothing has been decided), and I m not trying to hold one here, but I guess I ll have to keep watching this. Sigh.

4 January 2006

Decklin Foster: The -devel Show

I think Debian ought to have a gong. (OK, the rest of that article is kind of blah blah blah, but I think out-of-context gongs are inherently funny.)

31 December 2005

Decklin Foster: Stabbing in the dark

There, I think I finally disagree with Language Log. Honestly, why do you think we don t teach linguistic analysis of any sort at all anymore? Because literature and composition classes have become the same thing: the best compromise for a set of conflicting requirements. We can do better. Any incompetent moron can teach you pointers and recursion. No, it does not matter if they are using a language you consider boring and ugly. But what they cannot teach you is how to think. Which one is your problem space? Programming languages do not map onto natural languages. Yes, you learn Latin so you can grasp grammar, logic and rhetoric. You do not learn $LANGUAGE so you can grasp pointers, recursion, and typing. You learn pointers, recursion, and typing so you can grasp clarity, expressiveness, refactorability, efficiency, and how to turn a mental model into a computable abstraction and vice versa. Learning the programming language is like learning how to hold a pencil and use a piece of paper so you can write the Latin words. It s kindergarten stuff and half of us can t teach it to college students. No, it doesn t matter if you use a pen instead. I suppose it doesn t matter if you have to use a typewriter with no whiteout and one hand tied behind your back, because that is very popular, or whatever. Or maybe you think it does. But stop acting like that s the fucking point. Both of you.

29 December 2005

Decklin Foster: An Explanation Is Requested

In case anyone only reading the tech feed is wondering why those particular bits of sarcasm (I think I should just stop doing that about holy-war topics) floated to the top of my feed this morning, it was a bunch of stupidity on my part and an occasionally annoying feature of PyBlosxom.

Daniel Stone: [tech] qt: not a gui toolkit

Decklin wonders why Qt has a SQL plugin. The answer is because it's a full development environment (think: MFC), not a GUI toolkit (think: GTK). Hope that helps.

(Last I checked, it also had a full XML parser, full string and array/list handling, socket handling, file handling, etc, etc, ad nauseum.)

Decklin Foster: Go abcde

Jesus Climent asks why I don t just provide the MusicBrainz data in a useable form for abcde as well. Really, what gave me pause was adding a dependency on all of Python to a package written in shell. It s either that or actually implementing MB in shell, which would be... impressive. But I suppose a Suggests: or something wouldn't be too bad. So, Jesus, your wish is my command! Perhaps you can find musicbrainz-get-tracks useful (does that jibe with the naming scheme for the internal cddb commands? I don t really remember). It s simply a version of lastcd from my package with some extraneous options thrown out and output in faked CDDB format instead of YAML. So yes, now abcde and anyone else s stupid program that is still using FreeDB (augh! DIE DIE DIE) can get its data from MB instead. Warning: I tested this on all of two CDs (one V/A, one not).

Decklin Foster: lastfmsubmitd

Apparently, tis the season to be writing your own Last.fm plugin. So here is mine. I finally got fed up with finding and causing bugs in mpdscribble (I am a bad sponsor!) it s written in C with libsoup, blah blah, can t stand C, and so I revived the MPD pseudo-listener I had started on as a replacement for that awful orphaned cacheless one-off we were all using before mpdscribble. I also fixed a few issues that were bugging me, like failing to detect restarts and tag changes. Not wanting to muddy up any of that logic with HTTP gar, I decided to write a separate program to queue, cache and send along song submissions. They re two or three hundred lines of Python each, and single-threaded (yes, that means child writers blocking and hanging around if the network code is in the middle of timing out or backing off. Deal with it! This is UNIX). I m pretty happy with the design, although the implementation is still very rough. This also mimics the model they want to move to for player plugins in general, which is good, because it will be less work for me to implement version 2.0 of the protocol once that is finalized. Additionally, I was able to find a more satisfying way to solve the disconnected-CD-player problem than my previous dreadful method of either using a few kludgey scripts to frob around in my primary plugin s cache or dealing with using cdscrobbler and having to be very careful about one plugin not stepping on the other s toes and invalidating my backlog. So this is the second example program included. (Oh yes, that part uses the Python bindings for MusicBrainz. MB is awesome. The Python bindings are hideous, however straight port of the C++ API. I d probably be better off just dumping the RDF into a real RDF implementation and doing my own cross-referencing, instead of prying it out piecemeal with select queries and non-polymorphic getters and all the other absolute nonsense you have to deal with when writing in a language without high-level data types or garbage collection. But regardless of implementation woes, this has kept me close to the MB metadata for my favorite CDs, and so I ve been busy all week entering and voting on mods (and doing research to justify my changes), which is very satisfying. I have yet to begin the gargantuan task of adding MB tags to my Ogg collection (I know, this is really just a matter of babysitting tp_tagger, but I ve got some work cut out for me to even get to that point).) And of course, once this becomes less prototypey, anyone who likes it can knock all the networking code out of their plugin and use it as their system service . Perhaps if I m agile enough this can become official code! It is at least a mootable proof-of-concept that UNIX systems don t necessarily need a heavyweight libscrobbler to abstract the service stuff out of the player plugin. I won t get my hopes up though. Still a bit unsure about the name. Theoretically it seems the service (you know, the thing we pay money to if we like it) should be Last.fm, while the software and protocols should still be Audioscrobbler, but the distinction does not seem to be drawn very clearly in practice. With the analogous situation of livejournal vs. ljcom you had a grokkable technical delineation (different repositories) as well as other widely used installations besides ljcom (DeadJournal, etc). I really can t see there ever being a competing installation of Audioscrobbler, because licensing the streamables is a formidable investment hurdle, and there s a negative market effect (also, the web site is not open source). But I am also bored of just sticking scrobble onto something else, so I wanted to grab sticking last onto something else before it got old. I haven t the faintest clue what makes me prefer whimsical names for some projects and prosaic ones for others. Note to actual MPD users (all, like, 5 of you): the stuff in the package will not handshake at the moment, as I have not yet gotten Russ to bless the client ID I made up. Will try to catch him tomorrow. Or later today I suppose. It s ready to go now. Next up: Because it s either this or Sound Juicer, I think perhaps it s time to bid adieu to abcde and write a MusicBrainz plugin for jack (jack is nice enough, I just haven t had a truly compelling reason to switch, and there have always been lots of good eyeballs on abcde). FreeDB delenda est.

Decklin Foster: Seriously

(01:20:56) ***Decklin blinks
(01:21:03) Decklin: Depends: libqt4-sql
(01:21:14) Decklin: libqt4-*sql*??!?!?!!!!!?!??!!!
(01:21:28) Decklin: somebody needs to put down the crack
(01:26:32) Aslynn: ?
(01:29:33) Decklin: a gui toolkit library
(01:29:41) Decklin: depends on an SQL database.
(01:29:45) Decklin: that's completely insane.
(01:30:08) Aslynn: uh...huh...
(01:30:20) Decklin: it's sort of like... a car requiring a hard drive.
(01:31:01) Aslynn: ah.
(01:31:05) ***Decklin downloads 20mb of source packages to recompile overnight
(01:31:15) Aslynn: wanna play literati? :)
(01:31:49) Decklin: i'm already installing one overbloated and hideous software support system, i have no time for java
(01:31:58) Aslynn: Psh. JAVA HAS NO TIME FOR YOU.
(In Soviet Russia, Qt builds you!) No offense meant to pyro; I m sure someone has a very good reason for needing this. (Please don't tell me what it is. Ignorance is bliss.)

Decklin Foster: Humane interfaces

You know, I think the whole thing missing in this whole kerfuffle (as James Robertson put it) from a few days ago is that it s not list.first(), it s list.first. Just pretend you re sending a message, baby. Of course, if your brain is still stuck in imperative mode, the first is available; it s simply a matter of how to express what you wish to convey that you are doing, which is really not something that minimal class design defines as part of the problem. So. Ahem. Curtain.
HAMLET
Java s a prison.
ROSENCRANTZ
Then is the world one.
HAMLET
A goodly one; in which there are many classes, methods, and runtimes, Java being one o the worst.
ROSENCRANTZ
We think not so, my lord.
HAMLET
Why, then, tis none to you: for there is nothing either functional or procedural, but thinking makes it so: to me it is a non-Lisp.

Decklin Foster: Useful tip

If you are stuck on a Windows machine using PuTTY, and have saved you@foo.example.com in the interactive dialog as foo , you only need to type foo:target in the DOS box when running PSCP. I discovered this entirely by accident.

Decklin Foster: Non-GUI Music Players

Clint, I use MPD. You can do everything from the command line with mpc. (I frequently do, but I m also trying to help hack Pygmy into something decent for clicky-clicky use as well.) Also very useful if you want to do the whole diskless machine in the stereo cabinet with its library mounted over NFS thing.

Decklin Foster: Ruby Love

Matthew Palmer writes about the goodness that is Ruby. I, too, have just recently been won over, and am stumbling along with the online docs. In fact, this can be done in one line:
STDIN.readlines.sort_by   rand  .each    line  puts line  
But this is slow, as sort_by needs to be at least O(n lg n), and probably not perfectly random (I suppose you could do rand <=> 0.5, but that s not perfect either). What to do? We can implement a proper Fisher-Yates shuffle in a function, but that takes a couple lines. Can we still perform the actual read-and-print in one? Yesterday, why wrote something that really made me stop and go wow . We can attack the random sort problem in a similar (if more boring, as there are no lambdas to pass in) way, by simply adding another method to Array:
class Array
    def swap!(a, b)
        self[a], self[b] = self[b], self[a]
        self
    end
    def shuffle!
        each_index do  i 
            j = i + rand(length - i)
            swap!(i, j)
        end
        self
    end
end
STDIN.readlines.shuffle!.each    line  puts line  
Now that is cool.

9 December 2005

Decklin Foster: Permalinks Fixed

I had a very silly typo in my Atom 1.0 flavor (flavour?). Permalinks should work again. If this causes everything to rehash and thus flood the planet, sorry. Once PyBlosxom 1.3 is out, Atom will be native and I won t have to worry about not catching thinkos like this for months...

Jesus Climent: Timeline

08:02am: Decklin Foster mentions dropping FreeDB in favour of MusicBrainz, and abcde in favour of jack. 09:48am: I wonder if adding MusicBrainz support on abcde would be a bad idea. 05:20pm: Decklin Foster points me to a python script which provides the needed interface. 2 years later: I add MusicBrainz to abcde. No. Just joking. I will work on it during the next few days. Or in debconf-es2. Cheers!

8 December 2005

Decklin Foster: Really Bad Joke

I think #342502 would have read better in poem format:
this is just to say

i have recompiled
the bonnie++
which was linked
against libstdc++5

and which
you were probably
saving
until etch freezes

forgive me
g++-3.4 has a new ABI
so portable
and so fast
Somebody shoot me for doing that, please.

Jesus Climent: MusicBrainz

Decklin Foster: Why not writing an abstraction of a MusicBrainz plugin for jack and we can use it also in abcde?

Next.

Previous.